<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
    .box1{
      width: 1000px;
      height: 600px;
      margin: 200px auto;
    }
    .box1 textarea{
      width: 300px;
      height: 50px;
      margin-left: 200px;
      border-radius: 4px;
    }
    .box1 button{
      width: 70px;
      height: 50px;
      background: #00aeec;
      color: #fff;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      position: absolute;
      left: 865px;
    }
    .box2{
      width: 450px;
      height: 200px;
      border: 1px solid #b1aeae;
      margin-left: 170px;
      margin-top: 30px;
      color: #8a8787;
    }
  </style>
  <div class="box1">
    <textarea id="tx" placeholder="请发布你的留言"></textarea>
    <button>发布</button>
    <div class="box2">留言：</div>
  </div>
  <script>
    const tx = document.querySelector('#tx')
    const button = document.querySelector('button')
    const box2 = document.querySelector('.box2')
    button.addEventListener('click', function(){
      box2.innerHTML = `留言：${tx.value}`
    })
  </script>
</body>
</html>